package com.yl.auth.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 *
 * </p>
 *
 * @author ln
 * @since 2023-07-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户表
     */
      @TableId(value = "id", type = IdType.AUTO)
      @ApiModelProperty("id")
    private Integer id;
    @ApiModelProperty("姓名")
    private String name;
    @ApiModelProperty("手机号")
    private String phone;
    @ApiModelProperty("toxiang")
    private String toxiang;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;
    @ApiModelProperty("账号")
    private String zhanghao;
    @ApiModelProperty("密码")
    private String mima;
    @TableField(exist = false)
    @ApiModelProperty("角色姓名")
    private String rname;
    @ApiModelProperty("创建人id")
    private Integer adminId;
    @ApiModelProperty("创建人")
    private String userchuangjianren;
    @TableField("users_id")
    @ApiModelProperty("users外键id")
    private Integer usersId;

    @TableField(exist = false)
    private String token;
    @TableField(exist = false)
    private String username;
    @TableField(exist = false)
    private String password;

    @TableField(exist = false)
    private List<Role> roleList;

    @TableField(exist = false)
    private List<Permission> permissionList;

}
